﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AddIn.EA.Framework.Common;

namespace AddIn.EA.Framework
{
    /// <summary>
    /// Class that represent a list of tag values of an element.
    /// </summary>
    public class TaggedValueList : BaseList<TaggedValue>
    {
        #region Constructors
        /// <summary>
        /// Get an instance of a list of tagged values.
        /// </summary>
        /// <param name="reference">The reference of EA Object Model tag value.</param>
        /// <param name="parent">The parent element.</param>
        public TaggedValueList(EA_Application.Collection reference, IElement parent)
            : base(reference, parent) { }
        #endregion
    }

    /// <summary>
    /// Class that represent a tag value of an element.
    /// </summary>
    public class TaggedValue : BaseElement<EA_Application.TaggedValue>
    {
        #region Constructors
        /// <summary>
        /// Get an instance of tag value.
        /// </summary>
        /// <param name="reference">The reference of EA Object Model tag value.</param>
        /// <param name="parent">The parent element.</param>
        public TaggedValue(EA_Application.TaggedValue reference, IElement parent)
            : base(reference, parent) { }
        #endregion

        #region Properties
        
        #region BaseElement Members
        /// <summary>
        /// The tag value id.
        /// </summary>
        public override int ID
        {
            get { return this.Reference.PropertyID; }
        }
        /// <summary>
        /// The tag value name.
        /// </summary>
        public override string Name
        {
            get
            {
                return this.Reference.Name;
            }
            set
            {
                this.Reference.Name = value;
            }
        }
        #endregion

        /// <summary>
        /// Notes for tag value.
        /// </summary>
        public string Notes
        {
            get { return this.Reference.Notes; }
            set { this.Reference.Notes = value; }
        }
        /// <summary>
        /// The value of tag.
        /// </summary>
        public string Value
        {
            get { return this.Reference.Value; }
            set { this.Reference.Value = value; }
        }
        #endregion
    }
}
